unit mainform;

interface

uses
  StdCtrls, ExtCtrls, DB, DBCtrls, Classes, Controls, Grids, DBGrids, Forms,
  data;

type
  TFormMain = class(TForm)
    gridCustomers: TDBGrid;
    DBNavigator1: TDBNavigator;
    Button1: TButton;
    gridCustOrders: TDBGrid;
    labelCustomers: TLabel;
    Label1: TLabel;
    DBGrid1: TDBGrid;
    labelCustCalls: TLabel;
    Edit1: TEdit;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormMain: TFormMain;

implementation

{$R *.DFM}

procedure TFormMain.Button1Click(Sender: TObject);
begin
  dmMain.ToggleActivity;
end;

procedure TFormMain.Button2Click(Sender: TObject);
begin
  dmMain.datasetCustomers.Filtered := not dmMain.datasetCustomers.Filtered;
end;

procedure TFormMain.Button3Click(Sender: TObject);
begin
  dmMain.datasetCustomers.Filter := Edit1.Text;
end;

procedure TFormMain.Button4Click(Sender: TObject);
begin
  //IfxTable1.Active := not IfxTable1.Active;
  //IfxQuery1.Active := not IfxQuery1.Active;
  dmMain.datasetCustomers.Active := not dmMain.datasetCustomers.Active;
  {dmMain.connStores7.Open;
  with TIfxSQL.Create(nil) do
    try
      Connection := dmMain.connStores7;
      SQL.Text := 'update customer1 set fname = fname';
      Execute;
    finally
      Free;
    end;}
end;

end.
